<template>
  <div class="wholesale-detail">
    <div class="block">
      <header>
        <h2>订单信息</h2>
      </header>
      <section class="step">
        <div class="orderDetail">
          <p>订单编号：{{ orderDetail.orderCode }}</p>
          <p>供应商：{{ orderDetail.supplierName }}</p>
          <p>合同名称：{{ orderDetail.contractName }}</p>
          <p>手术类型：{{ orderDetail.contractName }}</p>
        </div>
        <step :stepData="stepData"></step>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>收货人信息</h2>
      </header>
      <section>
        <el-row>
          <el-col :span="7">收货联系人：{{consigneeInfo.addressee}}</el-col>
          <el-col :span="7">联系电话：{{consigneeInfo.addressPhone}}</el-col>
          <el-col
            :span="10"
          >收货地址：{{consigneeInfo.province}}{{consigneeInfo.city}}{{consigneeInfo.area}}{{consigneeInfo.detail}}</el-col>
          <el-col :span="5">运费承担方：{{orderDetail.freight}}</el-col>
        </el-row>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>产品信息</h2>
      </header>
      <section>
        <el-editable
          v-loading="tableLoading"
          :columns="C0LUMNS"
          :data="payload.content"
          :row-class-name="tableRowClassName"
          :payload="payload"
          :needPagination="true"
          @reload="reloadProductData"
        >
          <!-- <template slot="default-confirmCounts" slot-scope="scope">
            <el-input-number
              v-if="scope.row.orderCount > scope.row.inventoryCount&&scope.row.giftFlag!=='2'"
              v-model="scope.row.confirmCount"
              size="small"
              :min="scope.row.inventoryCount"
              :max="scope.row.orderCount"
            ></el-input-number>
            <span v-else @click="setCurrent(scope)">{{ scope.row.sureCount }}</span>
          </template>-->
        </el-editable>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>手术工具</h2>
      </header>
      <section>
        <el-editable
          v-loading="tableLoading"
          :columns="SURGICAL_TOOLS"
          :data="payload.content"
          :payload="payload"
          :needPagination="true"
          @reload="reloadTools"
        ></el-editable>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>下单人</h2>
      </header>
      <section>
        <p>{{orderDetail.commitUser}}</p>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>手术信息</h2>
      </header>
      <section>
        <p>{{orderDetail.remark?orderDetail.remark:"无"}}</p>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>承运方式</h2>
      </header>
      <section>
        <p>{{orderDetail.remark?orderDetail.remark:"无"}}</p>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>备注信息</h2>
      </header>
      <section>
        <p>{{orderDetail.remark?orderDetail.remark:"无"}}</p>
      </section>
    </div>
    <div class="block">
      <header>
        <h2>附加信息</h2>
      </header>
      <section class="orderTab">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
          <el-tab-pane label="库存配位" name="first">
            <el-editable :data="order_tab" :columns="DELIVERY_ORDER_C0LUMNS" />
          </el-tab-pane>
          <el-tab-pane label="支付信息" name="second">
            <p>
              支付时间:
              <span>2020-04-12 15:12:32</span>
            </p>
            <p>
              支付方式:
              <span>在线支付</span>
            </p>
            <p>
              支付金额:
              <span>15000元</span>
            </p>
          </el-tab-pane>
          <el-tab-pane label="配送信息" name="third">
            <el-editable :data="order_tab" :columns="SHIPPING_INFORMATION" />
          </el-tab-pane>
          <el-tab-pane label="发票信息" name="fourth">发票信息</el-tab-pane>
          <el-tab-pane label="收货信息" name="five">
            <el-editable :columns="RECEIVE_COORDINATION" :data="order_tab">
              <template slot="default-action" slot-scope="scope">
                <el-button type="text" @click="showLog(scope.row)">详情</el-button>
              </template>
            </el-editable>
          </el-tab-pane>
        </el-tabs>
      </section>
    </div>

    <el-dialog
      title="详情"
      :modal="true"
      custom-class="dialog-custom"
      :visible.sync="dialogVisible"
      width="50%"
    >
      <el-editable
        :data="order_tab"
        :columns="RECEIVE_C0LUMNS"
        :payload="receivData"
        :needPagination="true"
        @reload="reloadReceiv"
      />
    </el-dialog>
  </div>
</template>
<script src="./index.js"></script>

<style lang="less" src="./index.less" scoped></style>
